<template>
  <div class="description-group">
    <div class="group-header" :style="headerStyle">
      <span v-if="headerStyle">{{ title }}</span>
      <h4 v-else>{{ title }}</h4>
    </div>
    <el-row :gutter="gutter">
      <slot></slot>
    </el-row>
    <el-divider v-if="divider"></el-divider>
  </div>
</template>

<script>
export default {
  name: "DescriptionGroup",

  props: {
    title: String,

    gutter: {
      type: [Number, String],
      default: 20
    },

    divider: { type: Boolean, default: true },

    headerStyle: {
      type: Object,
      default: undefined
    }
  },

  data() {
    return {};
  }
};
</script>

<style lang="scss" scoped>
.description-group {
  .group-header {
    border-left-color: #409eff;
    border-left-width: 5px;
    border-radius: 3px;
    border-left-style: solid;
    padding-left: 6px;
  }
}
</style>
